package com.ldq.imooc.basics.multiThread;

/**
 * @Author : 李道泉
 * @Description :
 * @Date : 2018/4/23 21:46
 * @Modified by :
 */
public class KeyPersonThread extends Thread {

    public void run() {

        if (Thread.currentThread().getName().equals("李云龙独立团")) {
            System.out.println(Thread.currentThread().getName() + "：二营长，你他娘的意大利炮呢？给老子拉上来！");
        } else {
            System.out.println(Thread.currentThread().getName() + "：李团长，饶命啊！");
        }

        for (int i = 0; i < 10; i++) {

            if (Thread.currentThread().getName().equals("李云龙独立团")) {
                System.out.println(Thread.currentThread().getName() + "：秀芹 ：李云龙，你开炮啊！[" + i + "]");
            } else {
                System.out.println(Thread.currentThread().getName() + "：八路爷爷，饶命啊！[" + i + "]");
            }
        }

        if (Thread.currentThread().getName().equals("李云龙独立团")) {
            System.out.println(Thread.currentThread().getName() + "：城楼被摧毁，李夫人香消玉殒~~~");
        } else {
            System.out.println(Thread.currentThread().getName() + "：城楼被摧毁，山本卒，此仇报");
        }
    }
}
